import {createApp} from 'vue';
import { createPinia } from 'pinia';
import App from './App.vue';
import Hello from './components/Hello.vue';
import router from './router';
import emitter from './tools/emitter';
const app=createApp(App);
app.use(router);
app.component('Hello',Hello);
app.config.globalProperties.x=99;
declare module 'vue'{
    interface ComponentCustomProperties{
        x:number
    }
}
app.directive('beauty',(element,{value})=>{
    element.innerText +=value;
    element.style.color='green';
    element.style.backgroundColor='yellow';
})
const pinia=createPinia();
app.use(pinia);
app.mount('#app');
// setTimeout(()=>{
//     app.unmount();
// },2000)